import ClipboardJS from 'clipboard'
import { ElMessage } from 'element-plus'
// text：需要复制的文本内容
export function clipboard(text: string) {
  const url = text
  const oInput = document.createElement('textarea')
  oInput.value = url
  document.body.appendChild(oInput)
  oInput.select()
  document.execCommand('Copy')
  oInput.remove()
  ElMessage.success('复制成功')
}
